<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!--  /*  1、迎双旦，某加油站特推出回馈客户的活动，每逢周五优惠，92号汽油每升优惠3毛，95号汽油每升优惠5毛（92号汽油原价 6.78元/升，95号汽油原价：7.28元/升）根据车主的加油量，计算客户的油费 */

        /* 周五
              92号
              95号
        
        
        和非周五
             92号
              95号
        
        */ -->
</head>

<body>
    <script>
        var week = prompt('请输入今天周几');
        var oil = prompt('加92 还是 95 号油')
        var count = prompt('请输入想加多少升油');
        var oil92 = 6.78;
        var oil95 = 7.28;
        var money;

        if (week === '周五') {
            if (oil === '92') {
                money = (oil92 - 0.3) * count
            } else if (oil === '95') {
                money = (oil95 - 0.5) * count
            }
        } else {
            if (oil === '95') {
                money = oil95 * count
            } else if (oil === '92') {
                money = oil92 * count
            } else {
                alert('没有这种油')
            }

        }
        money = money.toFixed(2)//保留两位小数
        document.write('油费是' + money + '元')

    </script>

</body>

</html>